import pygame.mixer
sounds = pygame.mixer
sounds.init()

def wait_finish(channel):
    print("playing...")
    while channel.get_busy():
        pass

correct_s=sounds.Sound("correct.wav")
wrong_s=sounds.Sound("wrong.wav")

prompt="Press 1 for correct, 2 for wrong, or 0 to Quit: "

number_asked=0
number_correct=0
number_wrong=0

choice=str(input(prompt))
while choice !='0':
    if choice=='1':
        number_asked=number_asked+1
        number_correct=number_correct+1
        wait_finish(correct_s.play())
        print("choice ==1")
    if choice=='2':
        number_asked=number_asked+1
        number_wrong=number_wrong+1
        wait_finish(wrong_s.play())
        print("choice ==2")
    choice=str(input(prompt))

print("You asked " + str(number_asked) + " questions.")
print(str(number_correct) + " correctly. " + str(number_wrong) + " wrong.")
